package db.logging;

import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;


public class AppenderFileSync implements Appender{

	//should be read from configuration file
	File f = new File ("log.log");
	
	FileOutputStream fis;
	FileWriter fr;
	
	public AppenderFileSync() {
		try {
			fr = new FileWriter(f);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	
	public void store (String str) {
		//System.out.println(str);
		try {
			fr.write(str+"\n");
			fr.flush();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}
}
